<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>支付成功 - MarsPay支付系统</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        :root {
            --primary-color: #ffe60f;
            --primary-dark: #ffd700;
            --primary-light: #fff8c4;
            --text-dark: #333;
        }
        
        body {
            background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        .success-container {
            max-width: 500px;
            width: 100%;
        }
        
        .success-card {
            background: white;
            border-radius: 24px;
            padding: 60px 40px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
            animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        
        .success-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .success-icon-wrapper {
            width: 120px;
            height: 120px;
            background: linear-gradient(135deg, #52c41a, #73d13d);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
            animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
            box-shadow: 0 10px 30px rgba(82, 196, 26, 0.3);
            position: relative;
        }
        
        .success-icon-wrapper::after {
            content: '';
            position: absolute;
            width: 140px;
            height: 140px;
            border: 3px solid #52c41a;
            border-radius: 50%;
            opacity: 0.3;
            animation: pulse 2s ease-in-out infinite;
        }
        
        @keyframes scaleIn {
            from {
                transform: scale(0);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                opacity: 0.3;
            }
            50% {
                transform: scale(1.15);
                opacity: 0.1;
            }
        }
        
        .success-icon {
            font-size: 3.5rem;
            color: white;
        }
        
        .success-title {
            font-size: 2.2rem;
            font-weight: bold;
            color: #52c41a;
            margin-bottom: 15px;
            animation: fadeIn 0.6s ease 0.4s both;
        }
        
        .success-subtitle {
            color: #666;
            font-size: 1.1rem;
            margin-bottom: 40px;
            animation: fadeIn 0.6s ease 0.5s both;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        .action-buttons {
            display: grid;
            gap: 15px;
            animation: fadeIn 0.6s ease 0.6s both;
        }
        
        .btn-primary-custom {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--text-dark);
            border: none;
            padding: 14px 40px;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 50px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 230, 15, 0.4);
            text-decoration: none;
            display: inline-block;
        }
        
        .btn-primary-custom:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 230, 15, 0.5);
            color: var(--text-dark);
        }
        
        .btn-secondary-custom {
            background: white;
            color: var(--text-dark);
            border: 2px solid #e8e8e8;
            padding: 14px 40px;
            font-size: 1.1rem;
            font-weight: 500;
            border-radius: 50px;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }
        
        .btn-secondary-custom:hover {
            border-color: var(--primary-color);
            background: var(--primary-light);
            color: var(--text-dark);
        }
        
        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background: var(--primary-color);
            animation: confetti-fall 3s ease-out;
        }
        
        @keyframes confetti-fall {
            0% {
                transform: translateY(-100vh) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotate(720deg);
                opacity: 0;
            }
        }
    </style>
</head>
<body>
    <div class="success-container">
        <div class="success-card">
            <div class="success-icon-wrapper">
                <i class="bi bi-check-lg success-icon"></i>
            </div>
            <h1 class="success-title">支付成功！</h1>
            <p class="success-subtitle">✨ 感谢您的购买，祝您使用愉快</p>
            <div class="action-buttons">
                <a href="/" class="btn-primary-custom">
                    <i class="bi bi-house"></i> 返回首页
                </a>
                <a href="/order/list" class="btn-secondary-custom">
                    <i class="bi bi-list-check"></i> 查看订单
                </a>
            </div>
        </div>
    </div>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 创建彩纸效果
        function createConfetti() {
            const colors = ['#ffe60f', '#ffd700', '#52c41a', '#73d13d', '#ff6b6b'];
            for (let i = 0; i < 30; i++) {
                setTimeout(() => {
                    const confetti = document.createElement('div');
                    confetti.className = 'confetti';
                    confetti.style.left = Math.random() * 100 + '%';
                    confetti.style.background = colors[Math.floor(Math.random() * colors.length)];
                    confetti.style.animationDelay = Math.random() * 0.5 + 's';
                    confetti.style.animationDuration = (Math.random() * 2 + 2) + 's';
                    document.body.appendChild(confetti);
                    
                    setTimeout(() => confetti.remove(), 3000);
                }, i * 50);
            }
        }
        
        // 页面加载时触发彩纸效果
        window.addEventListener('load', () => {
            setTimeout(createConfetti, 300);
        });
    </script>
</body>
</html>
